#pragma	once



namespace	MomogenkyouHelper	{

class ShapeSphere
{
public:
	float3		CenterPoint;
	float		Radius;
	
	ShapeSphere() : CenterPoint(0, 0, 0), Radius(0)	{}
	ShapeSphere(const float3 & vPoint, const float & fRadius) : CenterPoint(vPoint), Radius(fRadius)	{}
};

class ShapeBox	:	ShapeSphere
{
public:
	float3		MinExtents;
	float3		MaxExtents;

	ShapeBox(const float3 & vPoint, const float3 & vMin, const float3 & vMax) 
		: MinExtents(vMin), MaxExtents(vMax)
	{
		CenterPoint = vPoint;
		Radius = max(vMin.x, vMin.y);
		Radius = max(Radius, vMin.z);
		Radius = max(Radius, vMax.x);
		Radius = max(Radius, vMax.y);
		Radius = max(Radius, vMax.z);
	}
};

//	Static Inlines for Intersection Tests

inline	static	bool	IntersectSphere(const float3 & vPointDifference, const float & fRadius1, const float & fRadius2)
{
	return D3DXVec3LengthSq(&vPointDifference) < pow(fRadius1 + fRadius2, 2);
}

//inline	static	bool	IntersectBox();
}